﻿@model WebBanHang.Models.TinTuc

@{
    ViewBag.Title = "Thêm Tin Tức";
}

@using (Html.BeginForm("Create", "TinTuc", FormMethod.Post, new { enctype = "multipart/form-data", id = "id-form" }))
{
    <div class="span-24 last">
        <div class="div_editor last">
            <div class="span-3">
                @Html.LabelFor(model => model.HinhAnh)
            </div>
            <div>
                @Html.TextBoxFor(model => model.File, new { @class = "file_1", type = "file" })
                @*<input type="file" class = "file_1" id="file"/>*@
                @Html.ValidationMessageFor(model => model.HinhAnh)
            </div>
        </div>

        <div class="div_editor last">
            <div class="span-3">
                @Html.LabelFor(model => model.TieuDe)
            </div>
            <div>
                @Html.TextBoxFor(model => model.TieuDe, new { @class = "inp-form" })
                @Html.ValidationMessageFor(model => model.TieuDe)
            </div>
        </div>

        <div class="div_editor">
            <div class="span-3">
                @Html.LabelFor(model => model.NgayViet)
            </div>
            <div class="editor-field">
                @Html.TextBoxFor(model => model.NgayViet, new { @class = "inp-form", id = "datepicker" })
                @Html.ValidationMessageFor(model => model.NgayViet)
            </div>
        </div>

        <div class="div_editor">
            <div class="span-3">
                @Html.LabelFor(model => model.GioiThieu)
            </div>
            <div class="editor-field">
                @Html.TextAreaFor(model => model.GioiThieu, new { @class = "form-textarea" })
                @Html.ValidationMessageFor(model => model.GioiThieu)
            </div>
        </div>
    </div>        

    <div class="clearfix"></div>
    <div class="full div_editor">
        @Html.TextAreaFor(model => model.NoiDung, new { @class= "texteditor"})
    </div>

    <div class="clearfix"></div>
    <p>
        <input type="submit" value="Lưu" class="button" />
    </p>    
}

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
    <!-- Place inside the <head> of your HTML -->
    <script type="text/javascript" src="~/Plugin/tinymce/tinymce.min.js"></script>
    <script type="text/javascript" src="~/Scripts/tinymce.config.js"></script>
    <script>
        $(function () {
            $("#datepicker").datepicker();
        });
    </script>
}
